package com.cloud.open.constant;

import lombok.Getter;

public enum AppStatusEnum {

    ENABLE(1, "启用"),
    DISABLE(0, "禁用");

    @Getter
    private int code;

    @Getter
    private String description;

    AppStatusEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public static AppStatusEnum of(int code) {
        for (AppStatusEnum appStatus : values()) {
            if (appStatus.code == code) {
                return appStatus;
            }
        }
        return null;
    }

}
